package org.loong.crypto.service.core.provider;

import java.security.KeyPair;

import org.loong.crypto.common.exception.CryptoException;
import org.loong.crypto.core.algorithm.KeyPairAlgorithm;

/**
 * KeyPairGenerator.
 */
public interface KeyPairGenerator extends KeyPairGeneratorProvider {

    /**
     * Generated {@link KeyPair}.
     * 
     * @param algorithm the algorithm
     * @param keySize the keySize
     * @return ${@link KeyPair}
     * @throws CryptoException the {@link CryptoException}
     */
    KeyPair generateKeyPair(KeyPairAlgorithm algorithm, int keySize) throws CryptoException;
}
